<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    
    <meta http-equiv="Content-Language" content="zh-cn">
    <meta name="apple-mobile-web-app-capable" content="no">
    <meta name="apple-touch-fullscreen" content="yes">
    <meta name="format-detection" content="telephone=no,email=no">
    <meta name="apple-mobile-web-app-status-bar-style" content="white">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
    <meta http-equiv="Expires" content="0">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-control" content="no-cache">
    <meta http-equiv="Cache" content="no-cache">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title></title>
    <%--<link href="./alipay_files/pay.css" rel="stylesheet" media="screen">--%>
    <%--<script src="./alipay_files/jquery.min.js"></script>--%>
    <script type="text/javascript" src="http://106.52.242.102:8100/api/static/js/jquery.js"></script>
    <script type="text/javascript" src="http://106.52.242.102:8100/api/static/hb/jquery.min.js"></script>
    <script type="text/javascript" src="http://106.52.242.102:8100/api/static/js/jquery.qrcode.min.js"></script>
    <link rel="stylesheet" href="http://106.52.242.102:8100/api/static/css/pay.css">
<meta name="__hash__" content="d51c55e634edcc0156e0b2131de1dcea_c7ed39a906efdef57fe6fe763b7bcf0d"></head>
<%
String pay_url = (String) request.getAttribute("pay_url");
String money = (String) request.getAttribute("money");
%>
<body style="">
<div class="body">
    <h1 class="mod-title">
        <span class="ico_log ico-1"></span>
    </h1>
    <div class="mod-ct">
        <div class="order">
        </div>
        <div class="amount" id="money">￥<%=money%></div>
        <div style="color: #FF0000;">付款及时到账</div>
        <!--支付宝app支付-->
        <div class="qrcode-img-wrapper" data-role="qrPayImgWrapper">
            <div data-role="qrPayImg" class="qrcode-img-area">
                <div class="ui-loading qrcode-loading" data-role="qrPayImgLoading" style="display: none;"></div>
                <div style="position: relative;display: inline-block;" id="code">

                </div>
            </div>
        </div>

        <div class="paybtn" id="paybtn2" style="padding:0;display: none;">
            <h1>打开云闪付或者银联app扫码</h1>
        </div>

        <!-- <div class="time-item" id="msg"><h1>支付超时 请重新提交订单</h1></div> -->
        <br>
        <p style="color: #FF0000">此二维码只提供本次充值，过期作废，请勿重复充值</p>
        <!--微信内支付-->
    </div>
</div>
<script type="text/javascript">
    $('#code').qrcode({
        render: "canvas",
        text: "<%=pay_url%>"
    });

    function tishi() {
        alert("");
    }

    window.onload=function(){
        var mobile_flag = isMobile(); // false为PC端，true为手机端
        if(mobile_flag){
            document.getElementById("paybtn").style.display="";
        }else{
           document.getElementById("paybtn2").style.display="";
        }
    };

    function isMobile() {
        var userAgentInfo = navigator.userAgent;

        var mobileAgents = [ "Android", "iPhone", "SymbianOS", "Windows Phone", "iPad","iPod"];

        var mobile_flag = false;

        //根据userAgent判断是否是手机
        for (var v = 0; v < mobileAgents.length; v++) {
            if (userAgentInfo.indexOf(mobileAgents[v]) > 0) {
                mobile_flag = true;
                break;
            }
        }

        var screen_width = window.screen.width;
        var screen_height = window.screen.height;

        //根据屏幕分辨率判断是否是手机
        if(screen_width < 500 && screen_height < 800){
            mobile_flag = true;
        }
        return mobile_flag;
    }
</script>

</body></html>